package com.tangkeyon.service;

import com.github.pagehelper.PageInfo;
import com.tangkeyon.common.ResponseCode;
import com.tangkeyon.pojo.Product;
import com.tangkeyon.vo.ProductDetailVO;
import com.tangkeyon.vo.ProductListInfoVo;

import java.util.List;

/**
 * @Author: tangkeyon@gmail.com
 * @Date: 2019/5/29 14:26
 * @Version 1.0
 */
public interface IProductService {
    /**
     * @Description: 保存或者修改商品信息
     * @param product
     * @return
     */
    ResponseCode saveOrUpdateProduct(Product product);

    /**
     * @Description: 修改商品的状态
     * @param productId
     * @param status
     * @return
     */
    ResponseCode setProductStatus(Integer productId, Integer status);


    /**
     * @Description: 根据ID查询商品
     * @param productId
     * @return
     */
    ResponseCode<ProductDetailVO> manageProductInfo(Integer productId);

    /**
     * 分页查找商品列表
     * @param pageNum
     * @param pageSize
     * @return
     */
    ResponseCode<PageInfo> selectProductListByPage(int pageNum, int pageSize);

    ResponseCode<PageInfo> searchProduct(Integer pageSize,Integer pageNum,String productName,Integer productId);

    ResponseCode<ProductDetailVO> getDetail(Integer productId);

    ResponseCode<PageInfo> searchProductListByCategoryIdOrName(String keyword, Integer categoryId, Integer pageSize, Integer pageNum, String orderby);



}
